package com.smartEdu.mapper.common;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.smartEdu.commons.BaseMapper;
import com.smartEdu.model.homework.report.HworkReportModel;
import com.smartEdu.po.ExamPaperPo;

public interface ExamPaperMapper extends BaseMapper<ExamPaperPo>{
	/**
	 * 获取试卷概要信息
	 * @param uid
	 * @return
	 */
	@Select("SELECT PK,hType,content FROM exampaper WHERE creator=#{uid}")
	public List<ExamPaperPo> findSummaryByCreator(@Param("uid") String uid);
	
	@Select("SELECT b.question FROM hwork_detail a INNER JOIN exampaper b ON exampk = b.PK AND a.PK = #{hwid}")
	public String findQuestion(@Param("hwid") String id);
	
	public List<HworkReportModel> findReport(@Param("tableName") String tableName,@Param("list") List<String> questlist);
	
	public Integer findReportCount(@Param("tableName") String tableName,@Param("list") List<String> questlist);
	
	
}
